Integrand size = 40, antiderivative size = 495 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx=\frac {2 \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^2 (a-b) b (a+b)^{3/2} d}-\frac {2 \left (6 a^2 b B-a b^2 B-3 b^3 B-3 a^3 C+a^2 b C\right ) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^2 (a-b) b (a+b)^{3/2} d}-\frac {2 \sqrt {a+b} B \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a^3 d}+\frac {2 b (b B-a C) \tan (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 b \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}} \]
[Out]
Time = 1.03 (sec) , antiderivative size = 495, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4157, 4008, 4145, 4143, 4006, 3869, 3917, 4089} \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx=-\frac {2 B \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{a^3 d}+\frac {2 b (b B-a C) \tan (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^{3/2}}+\frac {2 \left (-4 a^3 C+7 a^2 b B-3 b^3 B\right ) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{3 a^2 b d (a-b) (a+b)^{3/2}}-\frac {2 \left (-3 a^3 C+6 a^2 b B+a^2 b C-a b^2 B-3 b^3 B\right ) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{3 a^2 b d (a-b) (a+b)^{3/2}}+\frac {2 b \left (-4 a^3 C+7 a^2 b B-3 b^3 B\right ) \tan (c+d x)}{3 a^2 d \left (a^2-b^2\right )^2 \sqrt {a+b \sec (c+d x)}} \]
[In]
[Out]
Rule 3869
Rule 3917
Rule 4006
Rule 4008
Rule 4089
Rule 4143
Rule 4145
Rule 4157
Rubi steps \begin{align*} \text {integral}& = \int \frac {B+C \sec (c+d x)}{(a+b \sec (c+d x))^{5/2}} \, dx \\ & = \frac {2 b (b B-a C) \tan (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}-\frac {2 \int \frac {-\frac {3}{2} \left (a^2-b^2\right ) B+\frac {3}{2} a (b B-a C) \sec (c+d x)-\frac {1}{2} b (b B-a C) \sec ^2(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx}{3 a \left (a^2-b^2\right )} \\ & = \frac {2 b (b B-a C) \tan (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 b \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}+\frac {4 \int \frac {\frac {3}{4} \left (a^2-b^2\right )^2 B-\frac {1}{4} a \left (6 a^2 b B-2 b^3 B-3 a^3 C-a b^2 C\right ) \sec (c+d x)-\frac {1}{4} b \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{3 a^2 \left (a^2-b^2\right )^2} \\ & = \frac {2 b (b B-a C) \tan (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 b \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}+\frac {4 \int \frac {\frac {3}{4} \left (a^2-b^2\right )^2 B+\left (\frac {1}{4} b \left (7 a^2 b B-3 b^3 B-4 a^3 C\right )-\frac {1}{4} a \left (6 a^2 b B-2 b^3 B-3 a^3 C-a b^2 C\right )\right ) \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{3 a^2 \left (a^2-b^2\right )^2}-\frac {\left (b \left (7 a^2 b B-3 b^3 B-4 a^3 C\right )\right ) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx}{3 a^2 \left (a^2-b^2\right )^2} \\ & = \frac {2 \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^2 (a-b) b (a+b)^{3/2} d}+\frac {2 b (b B-a C) \tan (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 b \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}+\frac {B \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx}{a^2}+\frac {\left (a b^2 B+3 b^3 B+3 a^3 C-a^2 b (6 B+C)\right ) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{3 a^2 (a-b) (a+b)^2} \\ & = \frac {2 \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^2 (a-b) b (a+b)^{3/2} d}+\frac {2 \left (a b^2 B+3 b^3 B+3 a^3 C-a^2 b (6 B+C)\right ) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^2 (a-b) b (a+b)^{3/2} d}-\frac {2 \sqrt {a+b} B \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a^3 d}+\frac {2 b (b B-a C) \tan (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 b \left (7 a^2 b B-3 b^3 B-4 a^3 C\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(1545\) vs. \(2(495)=990\).
Time = 18.82 (sec) , antiderivative size = 1545, normalized size of antiderivative = 3.12 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx=\frac {(b+a \cos (c+d x))^3 \sec ^3(c+d x) \left (\frac {2 \left (-7 a^2 b B+3 b^3 B+4 a^3 C\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right )^2}-\frac {2 \left (b^3 B \sin (c+d x)-a b^2 C \sin (c+d x)\right )}{3 a^2 \left (a^2-b^2\right ) (b+a \cos (c+d x))^2}-\frac {2 \left (-8 a^2 b^2 B \sin (c+d x)+4 b^4 B \sin (c+d x)+5 a^3 b C \sin (c+d x)-a b^3 C \sin (c+d x)\right )}{3 a^2 \left (a^2-b^2\right )^2 (b+a \cos (c+d x))}\right )}{d (a+b \sec (c+d x))^{5/2}}-\frac {2 (b+a \cos (c+d x))^{5/2} \sec ^{\frac {5}{2}}(c+d x) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{1+\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \left (-7 a^3 b B \tan \left (\frac {1}{2} (c+d x)\right )-7 a^2 b^2 B \tan \left (\frac {1}{2} (c+d x)\right )+3 a b^3 B \tan \left (\frac {1}{2} (c+d x)\right )+3 b^4 B \tan \left (\frac {1}{2} (c+d x)\right )+4 a^4 C \tan \left (\frac {1}{2} (c+d x)\right )+4 a^3 b C \tan \left (\frac {1}{2} (c+d x)\right )+14 a^3 b B \tan ^3\left (\frac {1}{2} (c+d x)\right )-6 a b^3 B \tan ^3\left (\frac {1}{2} (c+d x)\right )-8 a^4 C \tan ^3\left (\frac {1}{2} (c+d x)\right )-7 a^3 b B \tan ^5\left (\frac {1}{2} (c+d x)\right )+7 a^2 b^2 B \tan ^5\left (\frac {1}{2} (c+d x)\right )+3 a b^3 B \tan ^5\left (\frac {1}{2} (c+d x)\right )-3 b^4 B \tan ^5\left (\frac {1}{2} (c+d x)\right )+4 a^4 C \tan ^5\left (\frac {1}{2} (c+d x)\right )-4 a^3 b C \tan ^5\left (\frac {1}{2} (c+d x)\right )-6 a^4 B \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+12 a^2 b^2 B \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-6 b^4 B \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-6 a^4 B \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+12 a^2 b^2 B \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-6 b^4 B \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+(a+b) \left (-7 a^2 b B+3 b^3 B+4 a^3 C\right ) E\left (\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+a (a+b) \left (-2 b^2 B+3 a^2 (B-C)+a b (3 B-C)\right ) \operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}\right )}{3 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^{5/2} \left (-1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {1+\tan ^2\left (\frac {1}{2} (c+d x)\right )}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \left (a \left (-1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )-b \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right )} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(7240\) vs. \(2(456)=912\).
Time = 5.34 (sec) , antiderivative size = 7241, normalized size of antiderivative = 14.63
[In]
[Out]
Timed out. \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx=\int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{\frac {5}{2}}}\, dx \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} \cos \left (d x + c\right )}{{\left (b \sec \left (d x + c\right ) + a\right )}^{\frac {5}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} \cos \left (d x + c\right )}{{\left (b \sec \left (d x + c\right ) + a\right )}^{\frac {5}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx=\int \frac {\cos \left (c+d\,x\right )\,\left (\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \]
[In]
[Out]